import BaseHttp from './baseHttp'

/**
 * 账户Service
 * @author：丁少华
 * @param：
 * @throws：
 * @time：2018/7/4
 */
class LineService extends BaseHttp {
  // 获取线路列表
  passListDemand(param) {
    let url = `${this.baseUrl.line}/line_c/pass_list_demand`
    let res = this.post(url, param)
    return res
  }

  // 添加线路
  addPassLine(param) {
    let url = `${this.baseUrl.line}/line_c/multi_add`
    let res = this.post(url, param)
    return res
  }

  // 提现
  payPriceCarry(param) {
    let url = `${this.baseUrl.line}/stat_c/pay_price_carry`
    let res = this.post(url, param)
    return res
  }

  // 货源圈-新货源
  passGuide(param) {
    let url = `${this.baseUrl.line}/stat_c/pass_guide`
    let res = this.post(url, param)
    return res
  }

  // 线路详情
  lineDetails(param) {
    let url = `${this.baseUrl.line}/line_c/pass_one_trade`
    let res = this.post(url, param)
    return res
  }

  // 货源被接单后的各种状态（已参与，待找车。。。）
  lineTruck(param) {
    let url = `${this.baseUrl.line}/line_c/pass_one_truck`
    let res = this.post(url, param)
    return res
  }

  //不知道啥接口，猜测物流运输进度
  passDriverStatus(param) {
    let url = `${this.baseUrl.line}/order_c/pass_driver_status`
    let res = this.post(url, param)
    return res
  }

  //（指派）物流需求单详情
  tradeDetails(param) {
    let url = `${this.baseUrl.line}/demand_c/get_one`
    let res = this.post(url, param)
    return res
  }

  //物流订单详情
  orderDetails(param) {
      let url = `${this.baseUrl.line}/order_c/get_one`
      let res = this.post(url, param)
      return res
  }


  //指派物流详情
  tradeWlDetails(param) {
    let url = `${this.baseUrl.line}/demand_c/assign_company_info`
    let res = this.post(url, param)
    return res
  }

  //发布司机运输详情
  passDetails(param) {
    let url = `${this.baseUrl.line}/line_c/get_one`
    let res = this.post(url, param)
    return res
  }

  //司机指派车辆详情
  getPassAtDlt(param) {
    let url = `${this.baseUrl.line}/driver_demand_c/get_one`
    let res = this.post(url, param)
    return res
  }

  //信息费统计
  userCredit(param) {
    let url = `${this.baseUrl.line}/stat_c/user_credit`
    let res = this.post(url,param)
    return res
  }

  //
  getDriver(param) {
    let url = `${this.baseUrl.line}/line_c/driver_unrelation_list`
    let res = this.post(url, param)
    return res
  }
  //获取继续指派司机
  getContinueDr(param){
      let url = `${this.baseUrl.line}/line_c/continue_assign_driver`
      let res = this.post(url, param)
      return res
  }
  //添加红包
  addRedcard(param) {
    let url = `${this.baseUrl.line}/red_card_c/add`
    let res = this.post(url, param)
    return res
  }
  //修改红包
  editRedcard(param) {
    let url = `${this.baseUrl.line}/red_card_c/edit`
    let res = this.post(url, param)
    return res
  }
  //获取用户红包管理
  getRedCard() {
    let url = `${this.baseUrl.line}/red_card_c/get_one`
    let res = this.post(url)
    return res
  }

  //获取红包总发放量
  getFlow() {
    let url = `${this.baseUrl.line}/red_card_c/flow`
    let res = this.post(url)
    return res
  }

  //发放列表
  getRedCardList(param) {
    let url = `${this.baseUrl.line}/red_card_order_c/get_list`
    let res = this.post(url, param)
    return res
  }

  //指派司机(司机线路下单&&双方物流)
  addBoth(param){
      let url = `${this.baseUrl.line}/driver_demand_c/add_both`
      let res = this.post(url, param)
      return res
  }


  //3方物流
  addSend(param){
      let url = `${this.baseUrl.line}/driver_demand_c/scene_add`
      let res = this.post(url, param)
      return res
  }



  //根据需求单id，获取需求单报价
  driverLinePrice(param){
      let url = `${this.baseUrl.line}/line_c/driver_line_price`
      let res = this.post(url, param)
      return res
  }


  //接单
  addPlanc(param){
      let url = `${this.baseUrl.line}/plan_c/add`
      let res = this.post(url, param)
      return res
  }

  //指派车辆详情-车辆列表
  passAppointList(param){
      let url = `${this.baseUrl.line}/driver_demand_c/assign_truck_info`
      let res = this.post(url, param)
      return res
  }

  //指派车辆详情-车辆详情
  dirverDtl(param){
      let url = `${this.baseUrl.line}/stat_c/user_card`
      let res = this.post(url, param)
      return res
  }

   //指派车辆详情-车辆详情-运输货物
    dirverGoodsDtl(param){
        let url = `${this.baseUrl.line}/driver_demand_c/get_truck_assign`
        let res = this.post(url, param)
        return res
    }

    //司机订单
    passIndentDtl(param){
        let url = `${this.baseUrl.line}/driver_order_c/get_one`
        let res = this.post(url, param)
        return res
    }

    //代接单
    priceCanOrder(param){
        let url = `${this.baseUrl.line}/driver_offer_c/price_can_order`
        let res = this.post(url, param)
        return res
    }

    //继续指派—选择车辆
    transAssignList(param){
        let url = `${this.baseUrl.line}/driver_demand_c/edit`
        let res = this.post(url, param)
        return res
    }

  // 工厂
  // static obj = new LineService()
  static getInstance() {
    return this.obj
  }
}
LineService.obj = new LineService()
export default LineService.getInstance()
